package com.eascs.ant.data.dao;

import java.util.Map;

import javax.inject.Inject;

import com.eascs.ant.data.mongo.MongoSession;
import com.eascs.ant.data.mongo.entity.MongoPageQuery;
import com.eascs.site.page.PaginationInfo;

public abstract class ProxyMongoDao {

	@Inject
	protected MongoSession mongoSession;

	public MongoSession getMongoSession() {
		return mongoSession;
	}

	public void setMongoSession(MongoSession mongoSession) {
		this.mongoSession = mongoSession;
	}

	
	public Map<String, Object>findOne(Map<String, Object> filter ,String collectionName){
		return mongoSession.findOne(filter, collectionName);
	}
	
	public PaginationInfo findDataArrayWithPage(MongoPageQuery<Object> mpq) {
		return mongoSession.findDataArrayWithPage(mpq);
	}
}
